import React from './react';
import ReactDOM from './react-dom';
function FunctionComponent(props){
  return <div className="title" style={{ color: 'red' }}><span>{props.name}</span>{props.children}</div>
}


class ClassComponent extends React.Component{
  constructor(props){
    super(props)
  }
  render(){
    return(
      <div className="title" style={{ color: 'red' }}><span>{this.props.name}</span>{this.props.children}</div>
    )
  }
}
let element3 = <div>
  <FunctionComponent name="hello">world</FunctionComponent>
  <ClassComponent name="hello">world</ClassComponent>
</div>

ReactDOM.render(
  element,
  document.getElementById('root')
);
